private ['_code', '_function', '_file'];

{
    _code = '';
    _function = _x select 0;
    _file = _x select 1;

    if (isText (missionConfigFile >> 'CfgAfterlifeCustomCode' >> _function)) then
    {
        _file = getText (missionConfigFile >> 'CfgAfterlifeCustomCode' >> _function);
    };

    _code = compileFinal (preprocessFileLineNumbers _file);

    missionNamespace setVariable [_function, _code];
}
forEach
[
	//系统
	['AfterlifeServer_system_network_dispatchIncomingMessage', 'afterlife_server\code\system\AfterlifeServer_system_network_dispatchIncomingMessage.sqf'],
	['AfterlifeServer_system_network_send_to', 'afterlife_server\code\system\AfterlifeServer_system_network_send_to.sqf'],
	['AfterlifeServer_system_network_send_broadcast', 'afterlife_server\code\system\AfterlifeServer_system_network_send_broadcast.sqf'],
	['AfterlifeServer_system_process_preInit', 'afterlife_server\code\system\AfterlifeServer_system_process_preInit.sqf'],
	['AfterlifeServer_system_process_postInit', 'afterlife_server\code\system\AfterlifeServer_system_process_postInit.sqf'],
	['AfterlifeServer_system_security_antihack_initialize', 'afterlife_server\code\system\AfterlifeServer_system_security_antihack_initialize.sqf'],
	//环境
	['AfterlifeServer_environment_initialize', 'afterlife_server\code\environment\AfterlifeServer_environment_initialize.sqf'],
	['AfterlifeServer_environment_control', 'afterlife_server\code\environment\AfterlifeServer_environment_control.sqf'],
	['AfterlifeServer_environment_thread_saveWeather', 'afterlife_server\code\environment\AfterlifeServer_environment_thread_saveWeather.sqf'],
	['AfterlifeServer_environment_thread_saveTime', 'afterlife_server\code\environment\AfterlifeServer_environment_thread_saveTime.sqf'],
	['AfterlifeServer_environment_thread_timeAccleration', 'afterlife_server\code\environment\AfterlifeServer_environment_thread_timeAccleration.sqf'],
	['AfterlifeServer_environment_killLights', 'afterlife_server\code\environment\AfterlifeServer_environment_killLights.sqf'],
	['AfterlifeServer_environment_spawnCrashSite', 'afterlife_server\code\environment\AfterlifeServer_environment_spawnCrashSite.sqf'],
	//实用工具
	['AfterlifeServer_util_log', 'afterlife_server\code\utilities\AfterlifeServer_util_log.sqf'],
	['AfterlifeServer_util_uidToPlayer', 'afterlife_server\code\utilities\AfterlifeServer_util_uidToPlayer.sqf'],
	//复活
	['AfterlifeServer_revive_network_revivePlayerRequest', 'afterlife_server\code\revive\AfterlifeServer_revive_network_revivePlayerRequest.sqf'],
	//动作
	['AfterlifeServer_action_network_seachBodyRequest', 'afterlife_server\code\action\AfterlifeServer_action_network_seachBodyRequest.sqf'],
	//载具
	['AfterlifeServer_vehicle_network_vehicleAddLockRequest', 'afterlife_server\code\vehicle\AfterlifeServer_vehicle_network_vehicleAddLockRequest.sqf'],
	['AfterlifeServer_vehicle_spawnWaterVehicles', 'afterlife_server\code\vehicle\AfterlifeServer_vehicle_spawnWaterVehicles.sqf'],
	//丧尸
	['AfterlifeServer_zombie_network_spawnZombieRequest', 'afterlife_server\code\zombie\AfterlifeServer_zombie_network_spawnZombieRequest.sqf'],
	['AfterlifeServer_zombie_thread_idle', 'afterlife_server\code\zombie\AfterlifeServer_zombie_thread_idle.sqf'],
	['AfterlifeServer_zombie_logic', 'afterlife_server\code\zombie\AfterlifeServer_zombie_logic.sqf'],
	['AfterlifeServer_zombie_event_shotsDetected', 'afterlife_server\code\zombie\AfterlifeServer_zombie_event_shotsDetected.sqf'],
	['AfterlifeServer_zombie_findTarget', 'afterlife_server\code\zombie\AfterlifeServer_zombie_findTarget.sqf'],
	//任务
	['AfterlifeServer_mission_network_completeMissionRequest', 'afterlife_server\code\mission\AfterlifeServer_mission_network_completeMissionRequest.sqf'],
	//玩家
	['AfterlifeServer_player_network_gainEXPRequest', 'afterlife_server\code\player\AfterlifeServer_player_network_gainEXPRequest.sqf'],
	['AfterlifeServer_player_network_updateLevelRequest', 'afterlife_server\code\player\AfterlifeServer_player_network_updateLevelRequest.sqf'],
	['AfterlifeServer_player_network_removeMoneyRequest', 'afterlife_server\code\player\AfterlifeServer_player_network_removeMoneyRequest.sqf'],
	//拍卖行
	['AfterlifeServer_market_checkListingID', 'afterlife_server\code\market\AfterlifeServer_market_checkListingID.sqf'],
	['AfterlifeServer_market_confirmStock', 'afterlife_server\code\market\AfterlifeServer_market_confirmStock.sqf'],
	['AfterlifeServer_market_createListingID', 'afterlife_server\code\market\AfterlifeServer_market_createListingID.sqf'],
	['AfterlifeServer_market_initalize', 'afterlife_server\code\market\AfterlifeServer_market_initalize.sqf'],
	['AfterlifeServer_market_updateStock', 'afterlife_server\code\market\AfterlifeServer_market_updateStock.sqf'],
	['AfterlifeServer_market_network_buyItemRequest', 'afterlife_server\code\market\AfterlifeServer_market_network_buyItemRequest.sqf'],
	['AfterlifeServer_market_network_listItemRequest', 'afterlife_server\code\market\AfterlifeServer_market_network_listItemRequest.sqf'],
	['AfterlifeServer_market_network_updateListingRequest', 'afterlife_server\code\market\AfterlifeServer_market_network_updateListingRequest.sqf']
];

call AfterlifeServer_system_process_preInit;

true
